<?php

/**
 * dodeletead.php
 * @package adServer
 * @filesource
 */

/*	Close the backdoor	*/
$curPage = strtoupper($_SERVER['PHP_SELF']);
if (isset($curPage) && strpos($curPage, 'INDEX.PHP') === false)
    header('Location:./index.php');

/*	Check if there is a form submitted	*/

if (isset($_REQUEST['adUnitId'])) {
    if ($session->loggedIn == true) {
        $session->deleteAdUnit($_REQUEST['adUnitId']);
    } else {
        echo 'Illegal operation, please try again';
    }
    header("Location:./index.php?action=display");
}

?>